build: fix building flask headers before descending in flask/ss/
authorAnthony PERARD <anthony.perard@citrix.com>
Tue, 7 Feb 2023 16:00:29 +0000 (17:00 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Feb 2023 16:00:29 +0000 (17:00 +0100)
commit819a5d4ed8b79e21843d5960a7ab8fbd16f28233
tree3dc49343bf6bd735339a2db7a29aad4f5590fc82
parent2d74e7035bd060d662f1c4f8522377be8021be92
build: fix building flask headers before descending in flask/ss/

Unfortunatly, adding prerequisite to "$(obj)/ss/built_in.o" doesn't
work because we have "$(obj)/%/built_in.o: $(obj)/% ;" in Rules.mk.
So, make is allow to try to build objects in "xsm/flask/ss/" before
generating the headers.

Adding a prerequisite on "$(obj)/ss" instead will fix the issue as
that's the target used to run make in this subdirectory.

Unfortunatly, that target is also used when running `make clean`, so
we want to ignore it in this case. $(MAKECMDGOALS) can't be used in
this case as it is empty, but we can guess which operation is done by
looking at the list of loaded makefiles.

Fixes: 7a3bcd2babcc ("build: build everything from the root dir, use obj=$subdir")
Reported-by: "Daniel P. Smith" <dpsmith@apertussolutions.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: d60324d8af9404014cfcc37bba09e9facfd02fcf
master date: 2023-01-23 15:03:58 +0100
xen/xsm/flask/Makefile